function read(query, user, request) {
    // Different SQL selections depending upon HTML query parameter

    var paramEmbedded = request.parameters.embedded;
    var paramSensor = request.parameters.sensor;


    if (paramEmbedded != null) {
        // If ?embedded=1 then don't return _DateTime
        if (paramEmbedded == 1) {
            query.where({ complete: false })
                .select('id', 'sensor', 'value')
                .orderByDescending('id');
            request.execute();
        }
            //If ?embedded=2 return _DateTime
        else if (paramEmbedded == 2) {
            query.where({ complete: false })
                .select('id', 'sensor', 'value', '_DateTime')
                .orderByDescending('id');
            request.execute();
        }
            //If ?embedded=3 return all Temperature values
        else if (paramEmbedded == 3) {
            if (paramSensor == null)
                paramSensor = 'Temperature';
            query.where({ sensor: paramSensor })
                .select('id', 'sensor', 'value')
                .orderByDescending('id');
            request.execute();
        }
            /// Add other embedded== options here
        else {
            //Default query: return all
            query.select('id', 'sensor', 'value', '_DateTime', 'complete')
                .orderByDescending('id');
            request.execute();
        }
    }
    else if (paramSensor != null) {
        query.where({ sensor: paramSensor })
            .select('id', 'sensor', 'value')
            .orderByDescending('id');
        request.execute();
    }
    else {
        //Default query: return all
        query.select('id', 'sensor', 'value', '_DateTime', 'complete')
            .orderByDescending('id');
        request.execute();
    }

}